const md5 = require('../utils/md5');

module.exports.encryption = async (req, res, next) => {
  try {
    req.body.password = md5(req.body.password);
    next();
  } catch (error) {
    res.status(500).json({}, 'Internal server error.');
  }
};
